# -*- coding: utf-8 -*-
# @Author  : LvShenkai
# @Time    : 2021/9/14 17:08
# @Function: 参数
from enum import Enum
import datetime


class Parameter(Enum):
    """
        参数枚举类
    """

    '''所有的数据列名'''
    COLUMNS = [
        'FLIGHTDATE', 'ITTL360', 'ITTL180', 'ITTL90', 'ITTL55', 'ITTL45', 'ITTL35', 'ITTL28',
        'ITTL25', 'ITTL22', 'ITTL19', 'ITTL17', 'ITTL15', 'ITTL13', 'ITTL11', 'ITTL9', 'ITTL8',
        'ITTL7', 'ITTL6', 'ITTL5', 'ITTL4', 'ITTL3', 'ITTL2', 'ITTL1', 'ITTL0', 'ITTLN1'
    ]

    '''需要归一化的数据列名'''
    COLUMNS_NORMALIZATION = [
        'ITTL360', 'ITTL180', 'ITTL90', 'ITTL55', 'ITTL45', 'ITTL35', 'ITTL28',
        'ITTL25', 'ITTL22', 'ITTL19', 'ITTL17', 'ITTL15', 'ITTL13', 'ITTL11', 'ITTL9', 'ITTL8',
        'ITTL7', 'ITTL6', 'ITTL5', 'ITTL4', 'ITTL3', 'ITTL2', 'ITTL1', 'ITTL0', 'ITTLN1'
    ]

    '''聚类中心的数据列名'''
    # COLUMNS_CENTER = [
    #     'index', 'cluster_label', 'DOW', 'ITTL35', 'ITTL28',
    #     'ITTL25', 'ITTL22', 'ITTL19', 'ITTL17', 'ITTL15', 'ITTL13', 'ITTL11', 'ITTL9', 'ITTL8',
    #     'ITTL7', 'ITTL6', 'ITTL5', 'ITTL4', 'ITTL3', 'ITTL2', 'ITTL1', 'ITTL0'
    # ]
    COLUMNS_CENTER = [
        'index', 'cluster_label', 'ITTL35', 'ITTL28',
        'ITTL25', 'ITTL22', 'ITTL19', 'ITTL17', 'ITTL15', 'ITTL13', 'ITTL11', 'ITTL9', 'ITTL8',
        'ITTL7', 'ITTL6', 'ITTL5', 'ITTL4', 'ITTL3', 'ITTL2', 'ITTL1', 'ITTL0'
    ]

    '''索引名称的转换字典'''
    INDEX_DIC = {
        'ITTL360': 360, 'ITTL180': 180, 'ITTL90': 90, 'ITTL55': 55, 'ITTL45': 45, 'ITTL35': 35, 'ITTL28': 28,
        'ITTL25': 25, 'ITTL22': 22, 'ITTL19': 19, 'ITTL17': 17, 'ITTL15': 15, 'ITTL13': 13, 'ITTL11': 11,
        'ITTL9': 9, 'ITTL8': 8, 'ITTL7': 7, 'ITTL6': 6, 'ITTL5': 5, 'ITTL4': 4, 'ITTL3': 3, 'ITTL2': 2,
        'ITTL1': 1, 'ITTL0': 0, 'ITTLN1': -1
    }

    '''需要依次聚类的列的起始组合'''
    START = 6  # 起始都是从'ITTL35'开始
    END = range(14, 27)  # ('ITTL13','ITTL0')

    '''固定的聚类中心个数'''
    FIXED_NUM_CENTER = 21

    '''区分测试集和训练集的时间点'''
    DATETIME_TRAIN_TEST = datetime.datetime(2019, 11, 1, 0, 0)

    '''index对应的数据列'''
    # base_columns = ('DOW', 'ITTL35', 'ITTL28', 'ITTL25', 'ITTL22', 'ITTL19', 'ITTL17', 'ITTL15', 'ITTL13')
    base_columns = ('ITTL35', 'ITTL28', 'ITTL25', 'ITTL22', 'ITTL19', 'ITTL17', 'ITTL15', 'ITTL13')
    COLUMNS_DICT_CENTER = {
        13: list(base_columns),
        11: list(base_columns) + ['ITTL11'],
        9: list(base_columns) + ['ITTL11', 'ITTL9'],
        8: list(base_columns) + ['ITTL11', 'ITTL9', 'ITTL8'],
        7: list(base_columns) + ['ITTL11', 'ITTL9', 'ITTL8', 'ITTL7'],
        6: list(base_columns) + ['ITTL11', 'ITTL9', 'ITTL8', 'ITTL7', 'ITTL6'],
        5: list(base_columns) + ['ITTL11', 'ITTL9', 'ITTL8', 'ITTL7', 'ITTL6', 'ITTL5'],
        4: list(base_columns) + ['ITTL11', 'ITTL9', 'ITTL8', 'ITTL7', 'ITTL6', 'ITTL5', 'ITTL4'],
        3: list(base_columns) + ['ITTL11', 'ITTL9', 'ITTL8', 'ITTL7', 'ITTL6', 'ITTL5', 'ITTL4', 'ITTL3'],
        2: list(base_columns) +
           ['ITTL11', 'ITTL9', 'ITTL8', 'ITTL7', 'ITTL6', 'ITTL5', 'ITTL4', 'ITTL3', 'ITTL2'],
        1: list(base_columns) + ['ITTL11', 'ITTL9', 'ITTL8', 'ITTL7', 'ITTL6', 'ITTL5', 'ITTL4', 'ITTL3', 'ITTL2',
                                 'ITTL1'],
        0: list(base_columns) + ['ITTL11', 'ITTL9', 'ITTL8', 'ITTL7', 'ITTL6', 'ITTL5', 'ITTL4', 'ITTL3', 'ITTL2',
                                 'ITTL1', 'ITTL0'],
        -1: list(base_columns) +
            ['ITTL11', 'ITTL9', 'ITTL8', 'ITTL7', 'ITTL6', 'ITTL5', 'ITTL4', 'ITTL3', 'ITTL2',
             'ITTL1', 'ITTL0', 'ITTLN1']
    }

    '''所有的index'''
    INDEXS = [13, 11, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]

    '''预测结果列名'''
    COLUMNS_PREDICT_RESULT = ['FLIGHTDATE', 'ITTLN1', 'C13', 'C11', 'C9', 'C8', 'C7', 'C6', 'C5', 'C4', 'C3', 'C2',
                              'C1',
                              'C0']
